package com.ssy.lingxi.product.service.es;


import com.ssy.lingxi.product.api.model.request.CommodityCreditScore;
import com.ssy.lingxi.product.api.model.request.CommoditySold;
import com.ssy.lingxi.product.api.model.response.SimpleBrandResponse;
import com.ssy.lingxi.product.api.model.response.channelCommodity.ChannelCommodityESResponse;
import com.ssy.lingxi.product.api.model.response.commodity.CommodityDetailResponse;
import com.ssy.lingxi.product.api.model.response.commodity.UnitPriceStrategyResponse;

import java.util.List;

/**
 * 商品搜索管理类
 * @author jw.chen
 * @version 2.0.0
 * @date 2020/7/28
 */
public interface ISyncEsCommodityService {
    /**
     * 同步商品信息
     * @return
     */
    String syncCommodity();

    /**
     * 同步渠道商品信息
     * @return
     */
    String syncChannelCommodity();

    /**
     * 更新会员商品已售数量
     */
    Boolean updateCommoditySold(CommoditySold commoditySold);

    /**
     * 更新常购清单
     */
    Boolean updateOftenBuyCommodity(CommoditySold commoditySold);

    /**
     * 更新渠道商品已售数量
     * @param commoditySold
     */
    Boolean updateChannelCommoditySold(CommoditySold commoditySold);

    /**
     * 更新商品对应的店铺积分
     * @param commodityCreditScore
     * @return
     */
    Boolean updateCommodityCreditScore(CommodityCreditScore commodityCreditScore);

    /**
     * 修改商品品牌
     * @return
     */
    Boolean updateCommodityBrand(SimpleBrandResponse brandResponse);

    /**
     * 修改商品价格
     * @param commodityDetailResponse
     */
    Boolean updateCommodityPrice(CommodityDetailResponse commodityDetailResponse);

    /**
     * 上架/下架商品信息
     * @param commodityDetailResponse
     */
    Boolean publishCommodity(CommodityDetailResponse commodityDetailResponse);

    /**
     * 批量上架/下架商品信息
     * @param commodityDetailResponseList
     */
    Boolean publishCommodityBatch(List<CommodityDetailResponse> commodityDetailResponseList);

    /**
     * 下架所有商品
     * @return
     */
    Boolean offPublishAllCommodity(List<Long> idList);

    /**
     * 上架/下架渠道商品信息
     * @param channelCommodityList
     */
    Boolean publishChannelCommodity(List<ChannelCommodityESResponse> channelCommodityList);

    /**
     * 下架所有渠道商品
     * @return
     */
    Boolean offPublishAllChannelCommodity(List<Long> idList);

    /**
     * 修改价格策略状态
     * @return
     */
    Boolean updateUnitPriceStrategy(UnitPriceStrategyResponse unitPriceStrategy);
}
